topic "U++ vs wxWidgets";
[l288;i704;a17;O9;~~~.992; $$1,0#10431211400427159095818037425705:param]
[a83;*R6 $$2,5#31310162474203024125188417583966:caption]
[b83;* $$3,5#07864147445237544204411237157677:title]
[b167;a42;C $$4,6#40027414424643823182269349404212:item]
[b42;a42;ph $$5,5#45413000475342174754091244180557:text]
[l288;a17; $$6,6#27521748481378242620020725143825:desc]
[l321;t246;C@5;1 $$7,7#20902679421464641399138805415013:code]
[b2503; $$8,0#65142375456100023862071332075487:separator]
[*@(0.0.255) $$9,0#83433469410354161042741608181528:base]
[t4167;C+117 $$10,0#37138531426314131251341829483380:class]
[l288;a17;*1 $$11,11#70004532496200323422659154056402:requirement]
[i416;b42;a42;O9;~~~.416; $$12,12#10566046415157235020018451313112:tparam]
[b167;C $$13,13#92430459443460461911108080531343:item1]
[a42;C $$14,14#77422149456609303542238260500223:item2]
[*@2$(0.128.128) $$15,15#34511555403152284025741354420178:NewsDate]
[l321;*C$7 $$16,16#03451589433145915344929335295360:result]
[l321;b83;a83;*C$7 $$17,17#07531550463529505371228428965313:result`-line]
[l160;t4167;*C+117 $$18,5#88603949442205825958800053222425:package`-title]
[ $$0,0#00000000000000000000000000000000:Default]
[{_}%EN-US 
[s2; U`+`+ vs wxWidgets&]
[s5; To compare U`+`+ with wxWindows, we decided to reimplement wxWindows 
demonstration example `"Bombs`". On the left side is U`+`+ code, 
on the right side wxWidgets code (part of wxWidgets release).&]
[s0;=2 &]
[ {{5000:5000f0;g0; [s0;= [2 
@@image:1549&1849
(AzYBcgEAAI7+AAAAAHic7Z0vmONG0ocFAw8GLggIOLAgYMGBBQEDAhYcWHDAIGBBwIIDBgcGBAw4MODAgAMGCwYcWPCBAQEDAgYEDAgYEGAQMCAgUGDA17b+uC1ZVqvVJVXZbz/1dLxK6+dydb8utUd2PT4+PGIYptLevn3r+vwlxzBMm11eXtaEzv5egWFYwxqEfvHVhzj7y1cfN/3XH7/4etP/xfV//bh5UPd//fhl0b9elv3rTf+l67+p+spev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xl6tw0Ry4dkRq0cZqlKz6HUt5pFO8cXvT+e0Dq7p95ugP7b5z2uvTZQztYfiS1ZeEvmG0R9XIxuQLBuESA1jt8BkM7gAXC4k+rFz2WQj3QLlZVAxg5bLPQiAQ7RjGCmQhEIRwxGrXIovdEACBmFO4M7jG/9ZHIASiJKvrvx2joaHR2w0aGppM+z/v6ATa)
]]}}&]
[s0;=2 &]
[s0;=2 &]
[ {{5000:5000^@7 [s0; [*2 U`+`+ version]]
:: [s0; [*2 wxWidgets version]]
::@2 [s0; [C0 #include <CtrlLib/CtrlLib.h>]&]
[s0;C0 &]
[s0; [C0 class Bombs : public TopWindow `{]&]
[s0; [C0 public:]&]
[s0; [C0 -|virtual void Paint(Draw`& w);]&]
[s0; [C0 -|virtual void LeftDown(Point p, dword flags);]&]
[s0; [C0 -|virtual void RightDown(Point p, dword flags);]&]
[s0;C0 &]
[s0; [C0 private:]&]
[s0; [C0 -|Size         level;]&]
[s0; [C0 -|int          cx, cy;]&]
[s0; [C0 -|int          normal`_cells, bombs;]&]
[s0; [C0 -|Buffer<byte> field;]&]
[s0; [C0 -|MenuBar      menu;]&]
[s0; [C0 -|StatusBar    status;]&]
[s0; [C0 -|]&]
[s0; [C0 -|byte`& Field(int x, int y) `{ return field`[x `+ y `* cx`]; 
`}]&]
[s0; [C0 -|]&]
[s0; [C0 -|enum `{]&]
[s0; [C0 -|-|HIDDEN `= 16,]&]
[s0; [C0 -|-|BOMB `= 32,]&]
[s0; [C0 -|-|MARK `= 64,]&]
[s0; [C0 -|-|EXPLODED `= 128,]&]
[s0;C0 &]
[s0; [C0 -|-|UNIT `= 30,]&]
[s0; [C0 -|`};]&]
[s0;C0 &]
[s0; [C0 -|void About();]&]
[s0; [C0 -|]&]
[s0; [C0 -|void File(Bar`& menu);]&]
[s0; [C0 -|void Game(Bar`& menu);]&]
[s0; [C0 -|void Menu(Bar`& menu);]&]
[s0; [C0 -|]&]
[s0; [C0 -|void Status();]&]
[s0; [C0 -|void Level(Size sz);]&]
[s0;C0 &]
[s0; [C0 public:]&]
[s0; [C0 -|void Uncover(int x, int y);]&]
[s0; [C0 -|void Generate();]&]
[s0; [C0 -|void UncoverAll();]&]
[s0;C0 &]
[s0; [C0 -|typedef Bombs CLASSNAME;]&]
[s0; [C0 -|Bombs();]&]
[s0; [C0 `};]&]
[s0;C0 &]
[s0; [C0 void Bombs`::Generate()]&]
[s0; [C0 `{]&]
[s0; [C0 -|cx `= level.cx;]&]
[s0; [C0 -|cy `= level.cy;]&]
[s0; [C0 -|field.Alloc(cx `* cy);]&]
[s0; [C0 -|for(int i `= cx `* cy `- 1; i >`= 0; i`-`-)]&]
[s0; [C0 -|-|field`[i`] `= (rand() `& 15) < 3 ? HIDDEN`|BOMB : HIDDEN;]&]
[s0; [C0 -|normal`_cells `= 0;]&]
[s0; [C0 -|for(int x `= 0; x < cx; x`+`+)]&]
[s0; [C0 -|-|for(int y `= 0; y < cy; y`+`+)]&]
[s0; [C0 -|-|-|if((Field(x, y) `& BOMB) `=`= 0) `{]&]
[s0; [C0 -|-|-|-|normal`_cells`+`+;]&]
[s0; [C0 -|-|-|-|for(int xx `= `-1; xx <`= 1; xx`+`+)]&]
[s0; [C0 -|-|-|-|-|for(int yy `= `-1; yy <`= 1; yy`+`+)]&]
[s0; [C0 -|-|-|-|-|-|if((xx `|`| yy) `&`& x `+ xx >`= 0 `&`& x `+ xx < cx 
`&`& y `+ yy >`= 0 `&`& y `+ yy < cy `&`&]&]
[s0; [C0 -|-|-|-|-|-|   (Field(x `+ xx, y `+ yy) `& BOMB))]&]
[s0; [C0 -|-|-|-|-|-|-|Field(x, y)`+`+;]&]
[s0; [C0 -|-|-|`}]&]
[s0; [C0 -|bombs `= cx `* cy `- normal`_cells;]&]
[s0; [C0 -|Rect r `= GetRect();]&]
[s0; [C0 -|r.SetSize(AddFrameSize(UNIT `* cx, UNIT `* cy));]&]
[s0; [C0 -|SetRect(r);]&]
[s0; [C0 -|Status();]&]
[s0; [C0 -|Refresh();]&]
[s0; [C0 `}]&]
[s0;C0 &]
[s0; [C0 void Bombs`::UncoverAll()]&]
[s0; [C0 `{]&]
[s0; [C0 -|for(int i `= cx `* cy `- 1; i >`= 0; i`-`-)]&]
[s0; [C0 -|-|field`[i`] `&`= `~HIDDEN;]&]
[s0; [C0 -|Refresh();]&]
[s0; [C0 `}]&]
[s0;C0 &]
[s0; [C0 void Bombs`::Paint(Draw`& w)]&]
[s0; [C0 `{]&]
[s0; [C0 -|for(int x `= 0; x < cx; x`+`+)]&]
[s0; [C0 -|-|for(int y `= 0; y < cy; y`+`+) `{]&]
[s0; [C0 -|-|-|byte f `= Field(x, y);]&]
[s0; [C0 -|-|-|w.DrawRect(x `* UNIT, y `* UNIT `+ UNIT `- 1, UNIT, 1, 
SBlack);]&]
[s0; [C0 -|-|-|w.DrawRect(x `* UNIT `+ UNIT `- 1, y `* UNIT, 1, UNIT, 
SBlack);]&]
[s0; [C0 -|-|-|w.DrawRect(x `* UNIT, y `* UNIT, UNIT `- 1, UNIT `- 1,]&]
[s0; [C0 -|-|-|           (f `& (HIDDEN`|MARK)) ? SLtGray : f `& BOMB ? 
SLtRed : SWhite);]&]
[s0; [C0 -|-|-|String txt;]&]
[s0; [C0 -|-|-|Color ink `= SBlack;]&]
[s0; [C0 -|-|-|Color cross `= Null;]&]
[s0; [C0 -|-|-|if(f `& MARK) `{]&]
[s0; [C0 -|-|-|-|txt `= `"M`";]&]
[s0; [C0 -|-|-|-|ink `= SLtRed;]&]
[s0; [C0 -|-|-|-|if((f `& (HIDDEN`|BOMB)) `=`= BOMB) `{]&]
[s0; [C0 -|-|-|-|-|ink `= SLtBlue;]&]
[s0; [C0 -|-|-|-|-|cross `= SLtRed;]&]
[s0; [C0 -|-|-|-|`}]&]
[s0; [C0 -|-|-|`}]&]
[s0; [C0 -|-|-|else]&]
[s0; [C0 -|-|-|if(!(f `& HIDDEN))]&]
[s0; [C0 -|-|-|-|if(f `& BOMB)]&]
[s0; [C0 -|-|-|-|-|txt `= `"B`";]&]
[s0; [C0 -|-|-|-|else `{]&]
[s0; [C0 -|-|-|-|-|f `= f `& 15;]&]
[s0; [C0 -|-|-|-|-|txt `= String(f `+ `'0`', 1);]&]
[s0; [C0 -|-|-|-|-|ink `= f `=`= 0 ? SLtGreen : f `=`= 1 ? SLtBlue : SBlack;]&]
[s0; [C0 -|-|-|-|`}]&]
[s0; [C0 -|-|-|Size tsz `= w.GetTextSize(txt, Roman(2 `* UNIT / 3));]&]
[s0; [C0 -|-|-|w.DrawText(x `* UNIT `+ (UNIT `- tsz.cx) / 2, y `* UNIT 
`+ (UNIT `- tsz.cy) / 2,]&]
[s0; [C0 -|-|-|           txt, Roman(2 `* UNIT / 3), ink);]&]
[s0; [C0 -|-|-|if(f `& EXPLODED)]&]
[s0; [C0 -|-|-|-|cross `= SLtBlue;]&]
[s0; [C0 -|-|-|w.DrawLine(x `* UNIT, y `* UNIT, x `* UNIT `+ UNIT `- 1, 
y `* UNIT `+ UNIT `- 1, 1, cross);]&]
[s0; [C0 -|-|-|w.DrawLine(x `* UNIT, y `* UNIT `+ UNIT `- 1, x `* UNIT 
`+ UNIT `- 1, y `* UNIT, 1, cross);]&]
[s0; [C0 -|-|`}]&]
[s0; [C0 `}]&]
[s0;C0 &]
[s0; [C0 void Bombs`::Uncover(int x, int y)]&]
[s0; [C0 `{]&]
[s0; [C0 -|if(x >`= 0 `&`& x < cx `&`& y >`= 0 `&`& y < cy) `{]&]
[s0; [C0 -|-|byte`& f `= Field(x, y);]&]
[s0; [C0 -|-|if((f `& (HIDDEN`|MARK)) `=`= HIDDEN) `{]&]
[s0; [C0 -|-|-|if(f `& BOMB) `{]&]
[s0; [C0 -|-|-|-|f `|`= EXPLODED;]&]
[s0; [C0 -|-|-|-|normal`_cells `= 0;]&]
[s0; [C0 -|-|-|-|UncoverAll();]&]
[s0; [C0 -|-|-|-|return;]&]
[s0; [C0 -|-|-|`}]&]
[s0; [C0 -|-|-|if((f `&`= `~HIDDEN) `=`= 0)]&]
[s0; [C0 -|-|-|-|for(int xx `= `-1; xx <`= 1; xx`+`+)]&]
[s0; [C0 -|-|-|-|-|for(int yy `= `-1; yy <`= 1; yy`+`+)]&]
[s0; [C0 -|-|-|-|-|-|if(xx `|`| yy)]&]
[s0; [C0 -|-|-|-|-|-|-|Uncover(x `+ xx, y `+ yy);]&]
[s0; [C0 -|-|-|normal`_cells`-`-;]&]
[s0; [C0 -|-|-|if(normal`_cells `=`= 0) `{]&]
[s0; [C0 -|-|-|-|UncoverAll();]&]
[s0; [C0 -|-|-|-|PromptOK(`"`[`*`@4A6 Nice!`]`&You have found all the bombs!`");]&]
[s0; [C0 -|-|-|`}]&]
[s0; [C0 -|-|`}]&]
[s0; [C0 -|`}]&]
[s0; [C0 `}]&]
[s0;C0 &]
[s0; [C0 void Bombs`::LeftDown(Point p, dword flags)]&]
[s0; [C0 `{]&]
[s0; [C0 -|if(!normal`_cells)]&]
[s0; [C0 -|-|return;]&]
[s0; [C0 -|p /`= UNIT;]&]
[s0; [C0 -|Uncover(p.x, p.y);]&]
[s0; [C0 -|Refresh();]&]
[s0; [C0 -|Status();]&]
[s0; [C0 `}]&]
[s0;C0 &]
[s0; [C0 void Bombs`::RightDown(Point p, dword flags)]&]
[s0; [C0 `{]&]
[s0; [C0 -|if(!normal`_cells)]&]
[s0; [C0 -|-|return;]&]
[s0; [C0 -|p /`= UNIT;]&]
[s0; [C0 -|if(Field(p.x, p.y) `& HIDDEN) `{]&]
[s0; [C0 -|-|Field(p.x, p.y) `^`= MARK;]&]
[s0; [C0 -|-|Refresh();]&]
[s0; [C0 -|`}]&]
[s0; [C0 `}]&]
[s0;C0 &]
[s0; [C0 void Bombs`::Status()]&]
[s0; [C0 `{]&]
[s0; [C0 -|status `= Format(`"%d bombs, %d cells remaining`", bombs, 
normal`_cells);]&]
[s0; [C0 `}]&]
[s0;C0 &]
[s0; [C0 void Bombs`::Level(Size sz)]&]
[s0; [C0 `{]&]
[s0; [C0 -|level `= sz;]&]
[s0; [C0 `}]&]
[s0;C0 &]
[s0; [C0 void Bombs`::About()]&]
[s0; [C0 `{]&]
[s0; [C0 -|PromptOK(`"`[`*A9/ uBombs`]`&`[A5 Ultimate```+```+ example`]`");]&]
[s0; [C0 `}]&]
[s0;C0 &]
[s0; [C0 void Bombs`::File(Bar`& menu)]&]
[s0; [C0 `{]&]
[s0; [C0 -|menu.Add(`"Exit`", Breaker(IDOK));]&]
[s0; [C0 -|menu.Separator();]&]
[s0; [C0 -|menu.Add(`"About..`", THISBACK(About));]&]
[s0; [C0 `}]&]
[s0;C0 &]
[s0; [C0 void Bombs`::Game(Bar`& menu)]&]
[s0; [C0 `{]&]
[s0; [C0 -|menu.Add(`"Restart`", THISBACK(Generate));]&]
[s0; [C0 -|menu.Separator();]&]
[s0; [C0 -|menu.Add(`"Easy`", THISBACK1(Level, Size(10, 10)))]&]
[s0; [C0 -|    .Check(level.cx `=`= 10);]&]
[s0; [C0 -|menu.Add(`"Medium`", THISBACK1(Level, Size(15, 15)))]&]
[s0; [C0 -|    .Check(level.cx `=`= 15);]&]
[s0; [C0 -|menu.Add(`"Difficult`", THISBACK1(Level, Size(25, 20)))]&]
[s0; [C0 -|    .Check(level.cx `=`= 25);]&]
[s0; [C0 `}]&]
[s0;C0 &]
[s0; [C0 void Bombs`::Menu(Bar`& menu)]&]
[s0; [C0 `{]&]
[s0; [C0 -|menu.Add(`"File`", THISBACK(File));]&]
[s0; [C0 -|menu.Add(`"Game`", THISBACK(Game));]&]
[s0; [C0 `}]&]
[s0;C0 &]
[s0; [C0 #define IMAGECLASS BombsImg]&]
[s0; [C0 #define IMAGEFILE  <Bombs/bombs.iml>]&]
[s0; [C0 #include <Draw/iml.h>]&]
[s0;C0 &]
[s0; [C0 Bombs`::Bombs()]&]
[s0; [C0 `{]&]
[s0; [C0 -|level `= Size(10, 10);]&]
[s0; [C0 -|AddFrame(menu);]&]
[s0; [C0 -|menu.Set(THISBACK(Menu));]&]
[s0; [C0 -|AddFrame(status);]&]
[s0; [C0 -|AddFrame(InsetFrame());]&]
[s0; [C0 -|Title(`"uBombs`");]&]
[s0; [C0 -|Icon(BombsImg`::Small());]&]
[s0; [C0 -|Generate();]&]
[s0; [C0 `}]&]
[s0;C0 &]
[s0; [C0 GUI`_APP`_MAIN]&]
[s0; [C0 `{]&]
[s0; [C0 -|Bombs b;]&]
[s0; [C0 -|b.Run();]&]
[s0; [C0 `}]&]
[s0;=2 ]
:: [s0; [C0 #include <wx/wx.h>]&]
[s0;C0 &]
[s0; [C0 const int ID`_RESTART `=   100;]&]
[s0; [C0 const int ID`_EASY `=      101;]&]
[s0; [C0 const int ID`_MEDIUM `=    102;]&]
[s0; [C0 const int ID`_DIFFICULT `= 103;]&]
[s0;C0 &]
[s0; [C0 class MyFrame: public wxFrame]&]
[s0; [C0 `{]&]
[s0; [C0 public:]&]
[s0; [C0     MyFrame( const wxString `&title, const wxPoint`& pos, 
const wxSize`& size );]&]
[s0; [C0     void OnAbout( wxCommandEvent `&event );]&]
[s0; [C0     void OnQuit( wxCommandEvent `&event );]&]
[s0; [C0     void OnLevel( wxCommandEvent `&event );]&]
[s0; [C0     void OnRestart( wxCommandEvent `&event );]&]
[s0; [C0     void OnPaint( wxPaintEvent`& event );]&]
[s0; [C0     void OnLeftDown( wxMouseEvent `&event );]&]
[s0; [C0     void OnRightDown( wxMouseEvent `&event );]&]
[s0;C0 &]
[s0; [C0     wxSize       level;]&]
[s0; [C0     int          cx, cy;]&]
[s0; [C0     int          normal`_cells, bombs;]&]
[s0; [C0     wxString     field;]&]
[s0; [C0     ]&]
[s0; [C0     enum `{]&]
[s0; [C0         HIDDEN `= 16,]&]
[s0; [C0         BOMB `= 32,]&]
[s0; [C0         MARK `= 64,]&]
[s0; [C0         EXPLODED `= 128,]&]
[s0; [C0         UNIT `= 30,]&]
[s0; [C0     `};]&]
[s0; [C0     ]&]
[s0; [C0     wxChar`& Field(int x, int y) `{ return field`[x `+ y `* 
cx`]; `}]&]
[s0; [C0     void Level( wxSize size )   `{ level `= size; `}]&]
[s0; [C0     void Status(); ]&]
[s0;C0 &]
[s0; [C0 public:]&]
[s0; [C0     void Uncover(int x, int y);]&]
[s0; [C0     void Generate();]&]
[s0; [C0     void UncoverAll();]&]
[s0; [C0 `};]&]
[s0;C0 &]
[s0; [C0 class MyApp: public wxApp]&]
[s0; [C0 `{]&]
[s0; [C0 public:]&]
[s0; [C0     virtual bool OnInit();]&]
[s0; [C0 `};]&]
[s0;C0 &]
[s0; [C0 MyFrame`::MyFrame( const wxString `&title, const wxPoint `&position, 
const wxSize`& size ) :]&]
[s0; [C0     wxFrame( NULL, `-1, title, position, size )]&]
[s0; [C0 `{]&]
[s0; [C0     wxMenu `*file`_menu `= new wxMenu;]&]
[s0; [C0     file`_menu`->Append( wxID`_ABOUT, wxT(`"About...`"), wxT(`"Program 
info`") );]&]
[s0; [C0     file`_menu`->AppendSeparator();]&]
[s0; [C0     file`_menu`->Append( wxID`_EXIT, wxT(`"Quit`"), wxT(`"Quit 
wxBombs`") );]&]
[s0; [C0     ]&]
[s0; [C0     wxMenu `*game`_menu `= new wxMenu;]&]
[s0; [C0     game`_menu`->Append( ID`_RESTART, wxT(`"Restart`"), wxT(`"Restart 
game`") );]&]
[s0; [C0     game`_menu`->AppendSeparator();]&]
[s0; [C0     game`_menu`->AppendRadioItem( ID`_EASY, wxT(`"Easy`"), 
wxT(`"Easy level`") );]&]
[s0; [C0     game`_menu`->AppendRadioItem( ID`_MEDIUM, wxT(`"Medium`"), 
wxT(`"Medium level`") );]&]
[s0; [C0     game`_menu`->AppendRadioItem( ID`_DIFFICULT, wxT(`"Difficult`"), 
wxT(`"Difficult level`") );]&]
[s0;C0 &]
[s0; [C0     wxMenuBar `*menu`_bar `= new wxMenuBar();]&]
[s0; [C0     menu`_bar`->Append( file`_menu, wxT(`"File`") );]&]
[s0; [C0     menu`_bar`->Append( game`_menu, wxT(`"Game`") );]&]
[s0; [C0     ]&]
[s0; [C0     SetMenuBar( menu`_bar );]&]
[s0; [C0     ]&]
[s0; [C0     CreateStatusBar(1);]&]
[s0; [C0     ]&]
[s0; [C0     Connect( wxID`_ABOUT, wxEVT`_COMMAND`_MENU`_SELECTED, 
wxCommandEventHandler(MyFrame`::OnAbout) );]&]
[s0; [C0     Connect( wxID`_EXIT, wxEVT`_COMMAND`_MENU`_SELECTED, wxCommandEventHandler
(MyFrame`::OnQuit) );]&]
[s0; [C0     Connect( ID`_RESTART, wxEVT`_COMMAND`_MENU`_SELECTED, 
wxCommandEventHandler(MyFrame`::OnRestart) );]&]
[s0; [C0     Connect( ID`_EASY, wxEVT`_COMMAND`_MENU`_SELECTED, wxCommandEventHandler(M
yFrame`::OnLevel) );]&]
[s0; [C0     Connect( ID`_MEDIUM, wxEVT`_COMMAND`_MENU`_SELECTED, wxCommandEventHandler
(MyFrame`::OnLevel) );]&]
[s0; [C0     Connect( ID`_DIFFICULT, wxEVT`_COMMAND`_MENU`_SELECTED, 
wxCommandEventHandler(MyFrame`::OnLevel) );]&]
[s0; [C0     ]&]
[s0; [C0     Connect( `-1, wxEVT`_LEFT`_DOWN, wxMouseEventHandler(MyFrame`::OnLeftDown) 
);]&]
[s0; [C0     Connect( `-1, wxEVT`_RIGHT`_DOWN, wxMouseEventHandler(MyFrame`::OnRightDown
) );]&]
[s0; [C0     Connect( `-1, wxEVT`_PAINT, wxPaintEventHandler(MyFrame`::OnPaint) 
);]&]
[s0; [C0     ]&]
[s0; [C0     level `= wxSize( 10, 10 );]&]
[s0; [C0 `}]&]
[s0;C0 &]
[s0;C0 &]
[s0; [C0 void MyFrame`::OnAbout( wxCommandEvent `&event )]&]
[s0; [C0 `{]&]
[s0; [C0     wxMessageDialog dialog( this, wxT(`"Welcome to wxBombs`"), 
wxT(`"About wxBombs`"), wxOK`|wxICON`_INFORMATION );]&]
[s0; [C0     dialog.ShowModal();]&]
[s0; [C0 `}]&]
[s0;C0 &]
[s0; [C0 void MyFrame`::OnQuit( wxCommandEvent `&event )]&]
[s0; [C0 `{]&]
[s0; [C0      Close( TRUE );]&]
[s0; [C0 `}]&]
[s0;C0 &]
[s0; [C0 void MyFrame`::OnLevel( wxCommandEvent `&event )]&]
[s0; [C0 `{]&]
[s0; [C0     switch (event.GetId())]&]
[s0; [C0     `{]&]
[s0; [C0         case ID`_EASY:       Level( wxSize( 10,10 ) ); break;]&]
[s0; [C0         case ID`_MEDIUM:     Level( wxSize( 15,15 ) ); break;]&]
[s0; [C0         case ID`_DIFFICULT:  Level( wxSize( 25,25 ) ); break;]&]
[s0; [C0     `}]&]
[s0; [C0 `}]&]
[s0;C0 &]
[s0; [C0 void MyFrame`::OnRestart( wxCommandEvent `&event )]&]
[s0; [C0 `{]&]
[s0; [C0     Generate();]&]
[s0; [C0 `}]&]
[s0;C0 &]
[s0; [C0 void MyFrame`::OnPaint( wxPaintEvent`& event )]&]
[s0; [C0 `{]&]
[s0; [C0     wxPaintDC w( this );]&]
[s0; [C0     ]&]
[s0; [C0     for(int x `= 0; x < cx; x`+`+)]&]
[s0; [C0         for(int y `= 0; y < cy; y`+`+) `{]&]
[s0; [C0             wxChar f `= Field(x, y);]&]
[s0; [C0             w.SetPen( `*wxBLACK`_PEN );]&]
[s0; [C0             w.DrawRectangle(x `* UNIT, y `* UNIT `+ UNIT `- 
1, UNIT, 1 );]&]
[s0; [C0             w.DrawRectangle(x `* UNIT `+ UNIT `- 1, y `* UNIT, 
1, UNIT );]&]
[s0; [C0             ]&]
[s0; [C0             w.SetPen( (f `& (HIDDEN`|MARK)) ? `*wxGREY`_PEN 
: f `& BOMB ? `*wxRED`_PEN : `*wxWHITE`_PEN );]&]
[s0; [C0             w.DrawRectangle(x `* UNIT, y `* UNIT, UNIT `- 
1, UNIT `- 1 );]&]
[s0;C0 &]
[s0; [C0             wxString txt;]&]
[s0; [C0             wxColour ink `= `*wxBLACK;]&]
[s0; [C0             wxPen cross;]&]
[s0; [C0             if(f `& MARK) `{]&]
[s0; [C0                 txt `= wxT(`"M`");]&]
[s0; [C0                 ink `= `*wxRED;]&]
[s0; [C0                 if((f `& (HIDDEN`|BOMB)) `=`= BOMB) `{]&]
[s0; [C0                     ink `= `*wxBLUE;]&]
[s0; [C0                     cross `= `*wxBLACK`_PEN;]&]
[s0; [C0                 `}]&]
[s0; [C0             `}]&]
[s0; [C0             else]&]
[s0; [C0             if(!(f `& HIDDEN))]&]
[s0; [C0                 if(f `& BOMB)]&]
[s0; [C0                     txt `= wxT(`"B`");]&]
[s0; [C0                 else `{]&]
[s0; [C0                     f `= f `& 15;]&]
[s0; [C0                     txt `= wxString( wxChar( f `+ wxT(`'0`') 
), (unsigned int )1);]&]
[s0; [C0                     ink `= f `=`= 0 ? `*wxGREEN : f `=`= 1 
? `*wxBLUE : `*wxBLACK;]&]
[s0; [C0                 `}]&]
[s0;C0 &]
[s0; [C0             wxSize tsz `= w.GetTextExtent(txt);]&]
[s0; [C0             w.DrawText(txt, x `* UNIT `+ (UNIT `- tsz.x) / 
2, y `* UNIT `+ (UNIT `- tsz.y) / 2 );]&]
[s0; [C0             if(f `& EXPLODED)]&]
[s0; [C0                 cross `= wxPen( `*wxBLUE );]&]
[s0; [C0             ]&]
[s0; [C0             if (cross !`= wxNullPen)]&]
[s0; [C0             `{]&]
[s0; [C0                 w.SetPen ( cross );]&]
[s0; [C0                 w.DrawLine(x `* UNIT, y `* UNIT, x `* UNIT 
`+ UNIT `- 1, y `* UNIT `+ UNIT `- 1 );]&]
[s0; [C0                 w.DrawLine(x `* UNIT, y `* UNIT `+ UNIT `- 
1, x `* UNIT `+ UNIT `- 1, y `* UNIT );]&]
[s0; [C0             `}]&]
[s0; [C0         `}]&]
[s0; [C0 `}]&]
[s0;C0 &]
[s0; [C0 void MyFrame`::OnLeftDown( wxMouseEvent `&event )]&]
[s0; [C0 `{]&]
[s0; [C0     if(!normal`_cells)]&]
[s0; [C0         return;]&]
[s0; [C0     wxPoint p( event.GetX(), event.GetY() );]&]
[s0; [C0     p.x /`= UNIT;]&]
[s0; [C0     p.y /`= UNIT;]&]
[s0; [C0     Uncover(p.x, p.y);]&]
[s0; [C0     Refresh();]&]
[s0; [C0     Status();]&]
[s0; [C0 `}]&]
[s0;C0 &]
[s0; [C0 void MyFrame`::OnRightDown( wxMouseEvent `&event )]&]
[s0; [C0 `{]&]
[s0; [C0     if(!normal`_cells)]&]
[s0; [C0         return;]&]
[s0; [C0     wxPoint p( event.GetX(), event.GetY() );]&]
[s0; [C0     p.x /`= UNIT;]&]
[s0; [C0     p.y /`= UNIT;]&]
[s0; [C0     if(Field(p.x, p.y) `& HIDDEN) `{]&]
[s0; [C0         Field(p.x, p.y) `^`= MARK;]&]
[s0; [C0         Refresh();]&]
[s0; [C0     `}]&]
[s0; [C0 `}]&]
[s0;C0 &]
[s0; [C0 void MyFrame`::Status()]&]
[s0; [C0 `{]&]
[s0; [C0     wxString text;]&]
[s0; [C0     text.Printf( wxT(`"%d bombs, %d cells remaining`"), bombs, 
normal`_cells );]&]
[s0; [C0     SetStatusText( text );]&]
[s0; [C0 `}]&]
[s0;C0 &]
[s0; [C0 void MyFrame`::Generate()]&]
[s0; [C0 `{]&]
[s0; [C0     cx `= level.x;]&]
[s0; [C0     cy `= level.y;]&]
[s0; [C0     field.Alloc(cx `* cy);]&]
[s0; [C0     for(int i `= cx `* cy `- 1; i >`= 0; i`-`-)]&]
[s0; [C0         field`[i`] `= (rand() `& 15) < 3 ? HIDDEN`|BOMB : HIDDEN;]&]
[s0; [C0     normal`_cells `= 0;]&]
[s0; [C0     for(int x `= 0; x < cx; x`+`+)]&]
[s0; [C0         for(int y `= 0; y < cy; y`+`+)]&]
[s0; [C0             if((Field(x, y) `& BOMB) `=`= 0) `{]&]
[s0; [C0                 normal`_cells`+`+;]&]
[s0; [C0                 for(int xx `= `-1; xx <`= 1; xx`+`+)]&]
[s0; [C0                     for(int yy `= `-1; yy <`= 1; yy`+`+)]&]
[s0; [C0                      if((xx `|`| yy) `&`& x `+ xx >`= 0 `&`& 
x `+ xx < cx `&`& y `+ yy >`= 0 `&`& y `+ yy < cy `&`&]&]
[s0; [C0                            (Field(x `+ xx, y `+ yy) `& BOMB))]&]
[s0; [C0                             Field(x, y)`+`+;]&]
[s0; [C0             `}]&]
[s0; [C0     bombs `= cx `* cy `- normal`_cells;]&]
[s0; [C0     SetClientSize( wxSize(UNIT `* cx, UNIT `* cy));]&]
[s0; [C0     Status();]&]
[s0; [C0     Refresh();]&]
[s0; [C0 `}]&]
[s0;C0 &]
[s0; [C0 void MyFrame`::Uncover(int x, int y)]&]
[s0; [C0 `{]&]
[s0; [C0     if(x >`= 0 `&`& x < cx `&`& y >`= 0 `&`& y < cy) `{]&]
[s0; [C0         wxChar`& f `= Field(x, y);]&]
[s0; [C0         if((f `& (HIDDEN`|MARK)) `=`= HIDDEN) `{]&]
[s0; [C0             if(f `& BOMB) `{]&]
[s0; [C0                 f `|`= EXPLODED;]&]
[s0; [C0                 normal`_cells `= 0;]&]
[s0; [C0                 UncoverAll();]&]
[s0; [C0                 return;]&]
[s0; [C0             `}]&]
[s0;C0 &]
[s0; [C0             if((f `&`= `~HIDDEN) `=`= 0)]&]
[s0; [C0                 for(int xx `= `-1; xx <`= 1; xx`+`+)]&]
[s0; [C0                     for(int yy `= `-1; yy <`= 1; yy`+`+)]&]
[s0; [C0                         if(xx `|`| yy)]&]
[s0; [C0                             Uncover(x `+ xx, y `+ yy);]&]
[s0; [C0             normal`_cells`-`-;]&]
[s0; [C0             if(normal`_cells `=`= 0) `{]&]
[s0; [C0                 UncoverAll();]&]
[s0; [C0                 wxMessageDialog dialog( this, wxT(`"You have 
found all the bombs!`"), wxT(`"wxBombs`"), wxOK`|wxICON`_INFORMATION 
);]&]
[s0; [C0                 dialog.ShowModal();]&]
[s0; [C0             `}]&]
[s0; [C0         `}]&]
[s0; [C0     `}]&]
[s0; [C0 `}]&]
[s0;C0 &]
[s0; [C0 void MyFrame`::UncoverAll()]&]
[s0; [C0 `{]&]
[s0; [C0     for(int i `= cx `* cy `- 1; i >`= 0; i`-`-)]&]
[s0; [C0         field`[i`] `= field`[i`] `& `~HIDDEN;]&]
[s0; [C0     Refresh();]&]
[s0; [C0 `}]&]
[s0;C0 &]
[s0; [C0 IMPLEMENT`_APP(MyApp)]&]
[s0;C0 &]
[s0; [C0 bool MyApp`::OnInit()]&]
[s0; [C0 `{]&]
[s0; [C0     MyFrame `*frame `= new MyFrame( wxT(`"wxBombs`"), wxPoint(20,20), 
wxSize(500,340) );]&]
[s0; [C0     frame`->Show( TRUE );]&]
[s0; [C0     return TRUE;]&]
[s0; [C0 `}]]}}]]